define(['jquery', 'knockout', 'text!./multipart.html', 'jqx-all'], 
        function($, ko, template) {
	function ViewModel(params, componentInfo) {
		var self = this;
		self.route = params.route;	    
		self.element = $(componentInfo.element);

		self.element.find('#jqxFileUpload').jqxFileUpload(
				{ theme:'admin', uploadUrl: '/rest/files', fileInputName: 'file' });
	}

  	return { 
  		viewModel: {
  			createViewModel: function (params, componentInfo) {
  				return new ViewModel(params, componentInfo);
  			}
  		}, 
  		template: template
  	}
});
